package com.alxy.day1.service;

import com.alxy.day1.entity.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;

import java.util.Optional;

/**
 * @author 爱莉希雅
 * @version java 17
 */
@SuppressWarnings({"all"})
public interface UserService {


    Page<User> findAll(Specification<User> spec, Pageable pageable);

    User save(User user);

    void deleteById(Long id);

    User saveAndFlush(User user);

    Optional<User> findById(Long id);
    //用户查询

}
